/** 
 * This class was created to keep information from a petition in a multi client environment. 
 * **/
public class clientPetition {

	private String requestID;
	private long initTime;
	private String matrixR;
	private long EndTime;
	private String wrTime;
	private String pTime;
	
	
	public clientPetition(String _requestID){
		this.requestID=_requestID;
		this.initTime=System.currentTimeMillis();
	}
	
	public String getRequestID() {
		return requestID;
	}
	public void setRequestID(String requestID) {
		this.requestID = requestID;
	}
	public long getInitTime() {
		return initTime;
	}
	public void setInitTime(long initTime) {
		this.initTime = initTime;
	}
	public String getMatrixR() {
		return matrixR;
	}
	public void setMatrixR(String matrixR) {
		this.matrixR = matrixR;
		String [] reply= this.matrixR.split("\n",4);
		wrTime=reply[1].substring(reply[1].indexOf("_")+1);
		pTime=reply[2].substring(reply[2].indexOf("_")+1);
		this.matrixR=reply[3];
		
		
	}
	public long getEndTime() {
		return EndTime;
	}
	public void setEndTime(long endTime) {
		EndTime = endTime;
	}
	
	public String getRWtime(){
		return this.wrTime;
	}
	
	public String getPtime(){
		return this.pTime;
	}
	
	public String getLtime(){
		return this.EndTime-this.initTime+"";
		
	}
	
	
	
	
}
